package com.yilu.driver.mvp.contract;

import com.is.common.base.BaseModel;
import com.is.common.base.BasePresenter;
import com.is.common.base.BaseView;
import com.is.common.retrofitrxcache.RxCacheResult;
import com.yilu.driver.entity.BatchAllResponse;
import com.yilu.driver.entity.RegisteredTraineeResponse;

import org.json.JSONObject;

import rx.Observable;

/**
 * @author Administrator
 * @date 2017/4/13 0013
 */

public interface RegisterTraineeContract {
    interface Model extends BaseModel {
        //获取未登记学员列表
        Observable<RxCacheResult<RegisteredTraineeResponse>> getUnRegisterTrainee(JSONObject json);

        //已登记学员列表
        Observable<RxCacheResult<RegisteredTraineeResponse>> getRegisterTrainee(JSONObject json);

        //加载筛选条件（科目、批次）
        Observable<RxCacheResult<BatchAllResponse>> getBatchAll(JSONObject json);
    }

    interface View extends BaseView {
        //更新UI
        void returnUnRegisterList(RegisteredTraineeResponse unRegisteredTrainee);

        void returnRegisterList(RegisteredTraineeResponse unRegisteredTrainee);

        void returnBatchAll(BatchAllResponse batchAllResponse);

    }

    abstract class Presenter extends BasePresenter<View, Model> {
        //发送获取未登记学员列表请求
        public abstract void getUnRegisterTrainee(JSONObject json);

        //发送获取已登记学员列表请求
        public abstract void getRegisterTrainee(JSONObject json);

        //发送获取筛选条件请求
        public abstract void getBatchAll(JSONObject json);

    }
}
